package yunwo.cn.yzstation.presenter;

import java.util.List;

import yunwo.cn.yzstation.bean.BatchNumberBean;
import yunwo.cn.yzstation.bean.CarOBJBean;
import yunwo.cn.yzstation.bean.ContinueBean;
import yunwo.cn.yzstation.bean.EndOrganbean;
import yunwo.cn.yzstation.view.activity.AssignmentActivity;
import yunwo.cn.yzstation.api.IassigmentModel;
import yunwo.cn.yzstation.api.IassigmentView;
import yunwo.cn.yzstation.base.BasePresenter;
import yunwo.cn.yzstation.bean.CarBean;
import yunwo.cn.yzstation.bean.DriverBean;
import yunwo.cn.yzstation.model.AssigmentModel;

/**
 * Created by lao on 2017/10/11.
 */

public class AssigmentPersenter extends BasePresenter<IassigmentView> implements IassigmentModel {

    AssignmentActivity assignmentActivity;
    IassigmentView iassigmentView;
    private final AssigmentModel mAssigmentModel;

    public AssigmentPersenter(AssignmentActivity assignmentActivity, IassigmentView iassigmentView) {
        this.assignmentActivity = assignmentActivity;
        this.iassigmentView = iassigmentView;
        mAssigmentModel = new AssigmentModel(assignmentActivity, this);
    }

    public void requestPopupCon(String mycarnumber) {
        mAssigmentModel.requestPopupCon(mycarnumber);
    }

    public void requestDriverPopupCon(String mydriver,String driverphone) {
        mAssigmentModel.requestDriverPopupCon(mydriver,driverphone);
    }

    @Override
    public void getDriverPopupConSueecss(List<DriverBean.DataBean> driverBeanList) {
        iassigmentView.getDriverPopupConSueecss(driverBeanList);
    }

    @Override
    public void getCarPopupConSueecss(List<CarBean.DataBean> carBeanList) {
        iassigmentView.getCarPopupConSueecss(carBeanList);
    }

    @Override
    public void getBachNumberSuccess(BatchNumberBean.DataBean dataBean) {
        iassigmentView.getBachNumberSuccess(dataBean);
    }

    @Override
    public void getContinueDataSuccess(ContinueBean.DataBean dataBean) {
        iassigmentView.getContinueDataSuccess(dataBean);
    }

    @Override
    public void getLoadingobjSuccess(List<CarOBJBean.DataBean> dataBeanList) {
        iassigmentView.getLoadingobjSuccess(dataBeanList);
    }

    @Override
    public void getEndOrganfailure() {
        iassigmentView.getEndOrganfailure();
    }

    @Override
    public void getEndOrganSuccess(List<EndOrganbean.DataBean> dataBeanList) {
        iassigmentView.getEndOrganSuccess(dataBeanList);
    }


    public void requestDriverPhonePopupCon(String mydriverphone,String name) {
        mAssigmentModel.requestDriverPhonePopupCon(mydriverphone,name);
    }

    public void getLoadingobj() {
        mAssigmentModel.getLoadingobj();
    }

    public void getBatchNumber() {
        mAssigmentModel.getBatchNumber();
    }

    public void getContinueData(String aContinue) {
        mAssigmentModel.getContinueData(aContinue);
    }

    public void getEndOrgan() {
        mAssigmentModel.getEndOrgan();
    }
}
